#include "SingleTask.h"
#include "TPTask.h"

enum T_MODE{singlethread, threadpool};
enum R_MODE{selectreactor, tpreactor};

class Runtime
{
 private:
  ACE_Reactor *reactor;
  Task *task;
  static Runtime *instance_;

 protected:
  Runtime()
    {
      reactor = 0;
    }
  ~Runtime(){}

 public:
  static Runtime *instance();
  int init(T_MODE t, R_MODE r, int thr_n = 1);
  void stop();
};
